package com.pei.Service.Impl;


import com.pei.Dao.Impl.userDaoImpl;
import com.pei.Dao.userDao;
import com.pei.Service.userService;
import com.pei.entity.user;

import java.util.List;

/**
 * Created by dell on 2018/8/6.
 */
public class userServiceImpl implements userService
{
    @Override
    public List<user> finduser(String name, int typeid, int yenum, int jinum) {
        userDao dao=new userDaoImpl();
        return dao.finduser(name,typeid, yenum, jinum);
    }

    @Override
    public int findByName(String name) {
        userDao dao=new userDaoImpl();
        return dao.findByName(name);
    }

    @Override
    public int adduser(user u,int typeid) {
        userDao dao=new userDaoImpl();
        return dao.adduser(u,typeid);
    }

    @Override
    public int deluser(int uid) {
        userDao dao=new userDaoImpl();
        return dao.deluser(uid);
    }

    @Override
    public user finduser(int uid) {
        userDao dao=new userDaoImpl();
        return dao.finduser(uid);
    }

    @Override
    public int upuser(user u) {
        userDao dao=new userDaoImpl();
        return dao.upuser(u);
    }

    @Override
    public int findcountuser(int type) {
        userDao dao=new userDaoImpl();
        return dao.findcountuser(type);
    }
}
